/**
 * @param id - 班级 id
 */
interface FetchClassContactAPIParams {
  id: string
  page: string
  limit: string
  keywords?: string
}

interface FetchClassContactAPIResData {
  code: number
  msg: string
  time: string
  data: {
    report_user: Person[]
    current_page: number
    total: number
    per_page: number
    last_page: number
    manage_user: Person[]
    manage_user_count: number
  }
}

/**
 * @description 分页获取班级通讯录
 */
export function fetchClassContactAPI(params: FetchClassContactAPIParams, token: string) {
  return httpInstance.get<FetchClassContactAPIResData, FetchClassContactAPIParams>(
    '/api/classes/classcontact',
    { params, headers: { token } },
  )
}
